package com.ruoyi.project.business.monthsalary.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.model.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 月薪对象 schedule_month_salary
 * 
 * @author ${author}
 * @date 2024-02-20
 */
@Data
public class MonthSalary extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**  */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 薪资月 */
    @Excel(name = "薪资月")
    private Integer month;

    /** 考勤年 */
    @Excel(name = "考勤年")
    private Integer year;

    /** 薪资计算日 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "薪资计算日", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date dueDate;

    /** 发薪日 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发薪日", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payDate;

    /** 实发金额 */
    @Excel(name = "应发金额")
    private BigDecimal amount;

//    /**
//     * 总计
//     */
//    private BigDecimal totalsalary;
//    /**
//     * 扣除各项后的应发
//     */
//    private BigDecimal resultsalary;
//    /**
//     * 社保
//     */
//    private BigDecimal socialSecurity;
//    /**
//     * 税
//     */
//    private BigDecimal tax;

    /** 是否删除 0:否 1:是 */
    @Excel(name = "是否删除 0:否 1:是")
    private Boolean deleted;

    /** 事件操作人id */
    @Excel(name = "事件操作人id")
    private Long creator;

    /** 事件更新人id */
    @Excel(name = "事件更新人id")
    private Long updater;

    /** 租户id */
    @Excel(name = "租户id")
    private Long tenantId;



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("month", getMonth())
            .append("year", getYear())
            .append("dueDate", getDueDate())
            .append("payDate", getPayDate())
            .append("amount", getAmount())
            .append("deleted", getDeleted())
            .append("creator", getCreator())
            .append("updater", getUpdater())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("tenantId", getTenantId())
            .toString();
    }
}
